package com.dcrzl.shcz.common.excel;

import com.alibaba.excel.converters.doubleconverter.DoubleStringConverter;
import com.alibaba.excel.converters.integer.IntegerStringConverter;
import com.alibaba.excel.converters.longconverter.LongStringConverter;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.data.WriteCellData;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
import lombok.extern.slf4j.Slf4j;

import java.util.Objects;

@Slf4j
public class MyGovTypeConverter extends LongStringConverter {
    @Override
    public WriteCellData<?> convertToExcelData(Long value, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) {
        String s = "";
        if(Objects.nonNull(value)){
           if (Objects.equals(value,1875525163790884866L)){
               s = "市评审中心";
           }else if (Objects.equals(value,1875525235886776321L)){
                s = "燕郊分中心";
           }
        }
        return new WriteCellData<String>(s);
    }
}
